#include "mirrorapp.h"
#include "mirror.h"
#include <zh/header.h>
#include <algorithm>
#include <Windows.h>

using namespace std;

INT WINAPI WinMain(__in HINSTANCE hInstance,
	__in_opt HINSTANCE hPrevInstance,
	__in LPSTR lpCmdLine,
	__in int nShowCmd)
{
	try
	{
		auto_ptr<ZH::Console> console(new ZH::Console("c_mirror"));
		auto_ptr<ZH::MirrorApp> app(new ZH::MirrorApp("mirror", 800, 600));
		auto_ptr<ZH::Mirror>	mirror(new ZH::Mirror());

		app->ShowWindow();
		app->Start(mirror.get());
	}
	catch (std::exception e)
	{
		printf("%s\n", e.what());
	}

	return 0;
}

